let arr = [1,2,3,4];

// `1-2-3-4`;
let str = arr.join('-');
console.log(str);

let str2 = '1-2-3-4'; //[1,2,3,4]

let arr2 = str2.split('-');

console.log(arr2);

console.log(arr2[2]);